home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Java 1996 August
/
Java - Summer 1996.iso
/
kaffe-0.2
/
lib
/
native
/
java.io
/
java.io.FileDescriptor.c
< prev
next >
Wrap
C/C++ Source or Header
|
1996-02-11
|
836b
|
40 lines
/*
* java.io.FileDescriptor.c
*
* Copyright (c) 1996 Systems Architecture Research Centre,
* City University, London, UK.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* Written by Tim Wilkinson <tim@sarc.city.ac.uk>, February 1996.
*/
#include <stdio.h>
#include <assert.h>
#include "java.io.FileDescriptor.h"
/*
* Initialise a file descriptor to the given file nr.
*/
struct Hjava_io_FileDescriptor*
java_io_FileDescriptor_initSystemFD(struct Hjava_io_FileDescriptor* this, long i)
{
unhand(this)->fd = i;
return (this);
}
/*
* Is this file descriptor valid ?
*/
long /* bool */
java_io_FileDescriptor_valid(struct Hjava_io_FileDescriptor* this)
{
if (unhand(this)->fd >= 0) {
return (1);
}
else {
return (0);
}
}